# -*- coding: utf-8 -*-
"""
@Time ： 2021/12/30 9:25
@Auth ： Jolg
@File ：test.py
@IDE ：PyCharm

"""
from apps.base.log import logger,conf
from apps.base.conf import conf
from apps.models import Users,AccessRecords
from apps.base.db import session
from apps.user import CurrentUser
from fastapi import Header, HTTPException,Request,APIRouter,Body,Depends
route = APIRouter()


@logger.catch()
@route.get("/test",summary='测试')
def login(user : CurrentUser= Depends(CurrentUser)):
    '''TOKEN 获取接口
    ============================
    '''
    logger.debug(user.username)
    data = {"msg": "登录失败!", "code": -1,"user":user}
    return data